package cn.emove.modular.system.service;


import cn.emove.core.common.page.LayuiPageFactory;
import cn.emove.modular.system.entity.TicketEntity;
import cn.emove.modular.system.mapper.TicketMapper;
import cn.emove.modular.system.model.TicketModel;
import cn.stylefeng.roses.core.datascope.DataScope;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TicketService extends ServiceImpl<TicketMapper, TicketEntity> {
    public Page<Map<String, Object>> selectTickets(DataScope dataScope, String orderNo, int orderSource, String beginTime, String endTime, String contactName, String shopName, String shopAdr, String type, String userId, String describes, String repairType) {
        Page page = LayuiPageFactory.defaultPage();
        return this.baseMapper.selectTickets(page,dataScope,orderNo, orderSource,beginTime, endTime,contactName,shopName,shopAdr,type,userId,describes,repairType);
    }

    public List<TicketModel> selectAllTicket(int orderSource, String orderNo, String beginTime, String endTime, String contactName, String shopName, String shopAdr, String type, String describes, String repairType) {
        return this.baseMapper.selectAllTicket(orderSource,orderNo,beginTime,endTime,contactName,shopName,shopAdr,type,describes,repairType);
    }

    public List<TicketModel> selectNewTickets() {
        return this.baseMapper.selectNewTickets();
    }
}
